/**
 * Created by chengke on 2018/2/12.
 */

let Sequelize = require('sequelize');

let sequelize = require('./db.js').webAccount;

module.exports = sequelize.define('keyword_report_day_a', {
    id: {
        comment: '主键',
        primaryKey: true,
        type: Sequelize.INTEGER
    },
    accountId: {
        type: Sequelize.STRING,
        field: 'account_id'
    },
    accountName: {
        type: Sequelize.STRING,
        field: 'account_name'
    },
    planId: {
        type: Sequelize.STRING,
        field: 'plan_id'
    },
    planName: {
        type: Sequelize.STRING,
        field: 'plan_name'
    },
    unitId: {
        type: Sequelize.STRING,
        field: 'unit_id'
    },
    unitName: {
        type: Sequelize.STRING,
        field: 'unit_name'
    },
    keywordId: {
        type: Sequelize.STRING,
        field: 'keyword_id'
    },
    wordId: {
        type: Sequelize.STRING,
        field: 'word_id'
    },
    keyword: {
        type: Sequelize.STRING,
        field: 'keyword'
    },
    cost: {
        type: Sequelize.STRING,
        field: 'cost'
    },
    cpc: {
        type: Sequelize.STRING,
        field: 'cpc'
    },
    click: {
        type: Sequelize.STRING,
        field: 'click'
    },
    impression: {
        type: Sequelize.STRING,
        field: 'impression'
    },
    ctr: {
        type: Sequelize.STRING,
        field: 'ctr'
    },
    cpm: {
        type: Sequelize.STRING,
        field: 'cpm'
    },
    position: {
        type: Sequelize.STRING,
        field: 'position'
    },
    date: {
        type: Sequelize.STRING,
        field: 'date'
    }
}, {
    underscored: true,
    freezeTableName: true
});
